{template 'header', $module}
<div class="menu">
<table cellpadding="0" cellspacing="0">
<tr>
{if $item == 'friend'}
	<td class="tab" id="add"><a href="friend.php?action=add"><span>添加商友</span></a></td>
	<td class="tab_nav">&nbsp;</td>
	<td class="tab" id="home"><a href="friend.php"><span>我的商友</span></a></td>
	<td class="tab_nav">&nbsp;</td>
	<td class="tab" id="type"><a href="type.php?item={$item}"><span>商友分类</span></a><script type="text/javascript">c(1);</script></td>
{elseif $item == 'favorite'}
	<td class="tab" id="add"><a href="favorite.php?action=add"><span>添加收藏</span></a></td>
	<td class="tab_nav">&nbsp;</td>
	<td class="tab" id="home"><a href="favorite.php"><span>商机收藏</span></a></td>
	<td class="tab_nav">&nbsp;</td>
	<td class="tab" id="type"><a href="type.php?item={$item}"><span>收藏分类</span></a><script type="text/javascript">c(1);</script></td>
{elseif $item == 'product'}
	<td class="tab" id="add"><a href="{$DT[file_my]}?mid=5&action=add"><span>添加{$MODULE[5][name]}</span></a></td>
	<td class="tab_nav">&nbsp;</td>
	<td class="tab" id="home"><a href="{$DT[file_my]}?mid=5"><span>管理{$MODULE[5][name]}</span></a></td>
	<td class="tab_nav">&nbsp;</td>
	<td class="tab" id="type"><a href="type.php?item={$item}"><span>{$MODULE[5][name]}分类</span></a></td>
{elseif $item == 'mall'}
	<td class="tab" id="add"><a href="{$DT[file_my]}?mid=16&action=add"><span>添加商品</span></a></td>
	<td class="tab_nav">&nbsp;</td>
	<td class="tab" id="home"><a href="{$DT[file_my]}?mid=16"><span>管理商品</span></a></td>
	<td class="tab_nav">&nbsp;</td>
	<td class="tab" id="type"><a href="type.php?item={$item}"><span>商品分类</span></a></td>
{elseif $item == 'news'}
	<td class="tab" id="add"><a href="news.php?action=add"><span>添加新闻</span></a></td>
	<td class="tab_nav">&nbsp;</td>
	<td class="tab" id="home"><a href="news.php"><span>管理新闻</span></a></td>
	<td class="tab_nav">&nbsp;</td>
	<td class="tab" id="type"><a href="type.php?item={$item}"><span>新闻分类</span></a><script type="text/javascript">c(3);</script></td>
{/if}
</tr>
</table>
</div>
{if $MG[type_limit] > -1}
<script type="text/javascript">
var _del = 0;
</script>
<form method="post" action="type.php">
<input type="hidden" name="item" value="{$item}"/>
<div class="ls">
<table cellpadding="0" cellspacing="0" class="tb">
<tr>
<th width="60">删</th>
<th width="80">排序</th>
<th>名称</th>
</tr>
{loop $types $k $v}
<tr onmouseover="this.className='on';" onmouseout="this.className='';">
<td align="center"><input name="type[{$v[typeid]}][delete]" type="checkbox" value="1" onclick="if(this.checked){_del++;}else{_del--;}"/></td>
<td align="center"><input name="type[{$v[typeid]}][listorder]" type="text" size="5" value="{$v[listorder]}" maxlength="3"/></td>
<td>&nbsp;&nbsp;<input name="type[{$v[typeid]}][typename]" type="text" size="20" value="{$v[typename]}" maxlength="50" style="width:200px;color:{$v[style]}"/> {$v[style_select]}</td>
</tr>
{/loop}
<tr onmouseover="this.className='on';" onmouseout="this.className='';">
<td class="f_red" align="center">新增</td>
<td align="center"><input name="type[0][listorder]" type="text" size="5" value="" maxlength="3"/></td>
<td>&nbsp;&nbsp;<input name="type[0][typename]" type="text" size="20" value="" maxlength="50" style="width:200px;"/> {$new_style}</td>
</tr>
<tr>
<td>&nbsp;</td>
<td height="50" colspan="3">&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" name="submit" value=" 提 交 " onclick="if(_del && !confirm('提示:您选择删除'+_del+'个分类？确定要删除吗？')) return false;" class="btn"/>
{if $MG[type_limit]}&nbsp;最多可定义 <strong class="f_red">{$MG[type_limit]}</strong> 个分类&nbsp;&nbsp;&nbsp;当前已定义 <strong class="f_blue">{count($types)}</strong> 个&nbsp;&nbsp;&nbsp;{/if}
</td>
</tr>
</table>
</div>
</form>
{else}
<br/><br/>
<center class="f_red">抱歉，您没有权限自定义分类</center>
<br/><br/>
{/if}
<script type="text/javascript">s('{$item}');m('type');</script>
{template 'footer', $module}